//
//  TopCell.m
//  卢卡的时光网
//
//  Created by 卡神 on 15/7/21.
//  Copyright © 2015年 lok. All rights reserved.
//

#import "TopCell.h"
#import "UIImageView+WebCache.h"

@implementation TopCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(TopModel *)model {
    _model = model;
    [self setNeedsLayout];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self.image sd_setImageWithURL:[NSURL URLWithString:[_model.images valueForKey:@"medium"]] placeholderImage:[UIImage imageNamed:@"5"]];
    self.title.text = _model.title;
    self.average.text = [NSString stringWithFormat:@"%.1lf",_model.average];
    self.starView.average = _model.average;
    
}

@end
